<template>
	<view class="content">
		<view class="">
			<u-cell-group v-for="(item,index) in cellList" :key="index" >
				<u-cell-item  :title="item.title" :title-style="{marginLeft:'20rpx'}" @tap="linkTo(item)">
					<u-icon slot="icon" :name="item.icon" :class="item.class" size="32"></u-icon> 
				</u-cell-item>
			</u-cell-group>
			<u-cell-group>
				<u-cell-item title="直播" @click="live" :title-style="{ marginLeft: '20rpx' }"><u-icon slot="icon" class="iconfont icon-chatbofang"></u-icon></u-cell-item>
			</u-cell-group>
			<view  style="height: 15rpx;"></view>
			<u-cell-group>
				<u-cell-item title="扫一扫" @click="checkSelect" :title-style="{ marginLeft: '20rpx' }"><u-icon slot="icon" name="scan" icon="scan" size="32"></u-icon></u-cell-item>
			</u-cell-group>
			<view  style="height: 15rpx;"></view>
			<u-cell-group>
				<u-cell-item title="小程序" @click="miniProgress" :title-style="{ marginLeft: '20rpx' }"><u-icon slot="icon" class="iconfont icon-chatxiaochengxu"></u-icon></u-cell-item>
			</u-cell-group>
			<view  style="height: 15rpx;"></view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			cellList:[
				{ title:"朋友圈",class:"iconfont icon-chatpengyouquan",bind:"pages/firendCircle/firendCircle" },
			]
		};
	},
	methods: {
		linkTo(item){
			item.bind && this.$u.route(item.bind)
		},
		//扫一扫
		checkSelect() {
			console.log("item")
			uni.vibrateLong();
			//扫码
			uni.scanCode({
				success: function(res) {
					// console.log('条码内容：' + res.result);
					this.$u.toast('条码类型:', res.scanType);
				}
			});
		},
		check(index) {
			console.log(index)
		},
		miniProgress() {
			uni.showToast({
				title: '未开发',
				position: 'bottom'
			})
		},
		live() {
			uni.showToast({
				title: '未开发',
				position: 'bottom'
			})
		}
	}
};
</script>

<style lang="scss" scoped>
	.content{
		
	}
</style>
